<template>
  <div class="parkC">
    <div class="parkC_title1">
      <span>{{ showType == 0 ? '园区企业分布信息' : (baseData.label + '分布情况') }}</span>
    </div>
    <div v-if="showType == 0" style="display: flex;flex-direction: row;width: 100%">
      <div class="parkC_num">能源化工产业园：4家</div>
      <div class="parkC_num">精细化工产业园：2家</div>
      <div class="parkC_num">敖镇综合产业园：4家</div>
      <div class="parkC_num">综合利用园：0家</div>
    </div>
    <div v-if="showType == 1" style="display: flex;flex-direction: row;width: 100%;flex-wrap: wrap">
      <div class="parkC_num1 device-num-list">
        <!-- {{ baseData.label }}：  -->
        <div class="device-num-box" v-for="item in baseData.children">
          {{ item.label + ':' + item.children.length + '个' }}
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "parkInfo",
  props: {
    showType: String,// 0 园区 1 传感器 2 监控,
    baseData: Array,
  }
}
</script>

<style lang="scss" scoped>
.parkC {
  display: flex;
  flex-direction: column;
  position: absolute;
  bottom: 100px;
  width: 600px;
  height: 180px;
  left: 50%;
  background-color: rgba(8, 32, 72, .7);
  transform: translate(-50%);
  z-index: 3;

  &_title1 {
    width: 216px;
    height: 24px;
    margin-top: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-left: 0px;
    background-size: 100% 100%;
    background-image: url("@/assets/bg_title1.png");

    span {
      height: 24px;
      font-size: 13px;
      font-family: Source Han Sans SC;
      font-weight: bold;
      color: #FFFFFF;
      margin-left: 11px;
      line-height: 24px;
      background: linear-gradient(0deg, #90CCFF 0%, #FAFAFB 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }
  }

  &_num {
    margin-top: 15px;
    font-size: 13px;
    font-family: Source Han Sans SC;
    font-weight: bold;
    color: #FFFFFF;
    width: 25%;
    text-align: center;
  }

  &_num1 {
    margin-top: 15px;
    font-size: 13px;
    font-family: Source Han Sans SC;
    font-weight: bold;
    color: #FFFFFF;
    padding-left: 5%;
    text-align: center;
  }

  &_num2 {
    margin-top: 15px;
    font-size: 13px;
    font-family: Source Han Sans SC;
    font-weight: bold;
    color: #FFFFFF;
    width: 20%;
    text-align: center;
  }

  .device-num-list {
    display: flex;
    flex-wrap: wrap;

    .device-num-box {
      margin-right: 30px;
      margin-bottom: 30px;
    }
  }
}
</style>